/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   Module Name          : com.yaodian100.ec.generatepage.web.IdxHotSaleAdvAction
   Module Description   :

   Date Created      : 2010/3/4
   Original Author   : apple.chang
   Team              : yaodian100
   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   MODIFICATION HISTORY
   ------------------------------------------------------------------------------
   Date Modified       Modified by       Comments
   ------------------------------------------------------------------------------
   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
package com.yaodian100.ec.generatepage.web;

import java.io.File;
import java.io.IOException;
import java.io.Reader;
import java.io.StringReader;
import java.text.ParseException;
import java.util.Properties;

import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.time.FastDateFormat;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.Preparable;
import com.yaodian100.core.common.exception.CoreException;
import com.yaodian100.core.common.utils.DateUtil;
import com.yaodian100.ec.common.EcConstant;
import com.yaodian100.ec.generate.entity.EventImage;
import com.yaodian100.ec.generate.entity.GenerateAdvertise;
import com.yaodian100.ec.generate.entity.GenerateContent;
import com.yaodian100.ec.generate.entity.GeneratePosition;
import com.yaodian100.ec.generate.service.GenerateService;

public class IdxHotSaleAdvAction extends ActionSupport implements Preparable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 8280417163118221483L;

	private final Logger logger = LoggerFactory.getLogger(IdxHotSaleAdvAction.class);
	private GenerateService generateService;
	private GenerateAdvertise advertise;
	private GeneratePosition position;
	private GenerateContent content;
	private StringBuilder contents;
	private String advId;
	private String advName;
	private String advType = "IDX_HOTSALE";
	private String advStatus;
	private String startDate;
	private String endDate;

	private File tab1Img = null;
	private String tab1ImgName;
	private String tab1ImgLink;
	private String tab1ImgFolder;
	private String tab1ProdId1;
	private String tab1ProdId2;
	private String tab1ProdId3;
	private String tab1ProdId4;
	private String tab1Prod1Link;
	private String tab1Prod2Link;
	private String tab1Prod3Link;
	private String tab1Prod4Link;
	private File tab2Img = null;
	private String tab2ImgName;
	private String tab2ImgLink;
	private String tab2ImgFolder;
	private String tab2ProdId1;
	private String tab2ProdId2;
	private String tab2ProdId3;
	private String tab2ProdId4;
	private String tab2Prod1Link;
	private String tab2Prod2Link;
	private String tab2Prod3Link;
	private String tab2Prod4Link;
	private File tab3Img = null;
	private String tab3ImgName;
	private String tab3ImgLink;
	private String tab3ImgFolder;
	private String tab3ProdId1;
	private String tab3ProdId2;
	private String tab3ProdId3;
	private String tab3ProdId4;
	private String tab3Prod1Link;
	private String tab3Prod2Link;
	private String tab3Prod3Link;
	private String tab3Prod4Link;
	private File tab4Img = null;
	private String tab4ImgName;
	private String tab4ImgLink;
	private String tab4ImgFolder;
	private String tab4ProdId1;
	private String tab4ProdId2;
	private String tab4ProdId3;
	private String tab4ProdId4;
	private String tab4Prod1Link;
	private String tab4Prod2Link;
	private String tab4Prod3Link;
	private String tab4Prod4Link;
	private File tab5Img = null;
	private String tab5ImgName;
	private String tab5ImgLink;
	private String tab5ImgFolder;
	private String tab5ProdId1;
	private String tab5ProdId2;
	private String tab5ProdId3;
	private String tab5ProdId4;
	private String tab5Prod1Link;
	private String tab5Prod2Link;
	private String tab5Prod3Link;
	private String tab5Prod4Link;
	private File tab6Img = null;
	private String tab6ImgName;
	private String tab6ImgLink;
	private String tab6ImgFolder;
	private String tab6ProdId1;
	private String tab6ProdId2;
	private String tab6ProdId3;
	private String tab6ProdId4;
	private String tab6Prod1Link;
	private String tab6Prod2Link;
	private String tab6Prod3Link;
	private String tab6Prod4Link;

	private EventImage eventImage = null;

	/**
	 * 新增首頁熱銷商品
	 * 
	 * @return
	 */
	public String addIdxHotSaleAdv() {
		advId = "";
		return "editIdxHotSaleAdv";
	}

	private String checkURL(String url) {
		if (!(url.substring(0, 5).equals("https") || url.substring(0, 4).equals("http")
				|| url.substring(0, 3).equals("ftp") || url.substring(0, 4).equals("rtsp") || url.substring(0, 3).equals("mms")))
			return "http://" + url;
		return url;
	}

	/**
	 * 编辑首页类别促销版位
	 * 
	 * @return
	 * @throws Exception
	 */
	public String editIdxHotSaleAdv() throws Exception {
		initVariables();
		advertise = generateService.get(Long.parseLong(advId));
		position = generateService.getGeneratePositionByAdvId(Long.parseLong(advId)).get(0);
		content = generateService.getGenerateContentByAdvId(Long.parseLong(advId)).get(0);
		advStatus = advertise.getAdvStatus();
		advType = advertise.getAdvType();
		advName = advertise.getAdvName();
		startDate = FastDateFormat.getInstance(EcConstant.PATTERN_DATE).format(advertise.getStartDate());
		endDate = FastDateFormat.getInstance(EcConstant.PATTERN_DATE).format(advertise.getEndDate());
		readPropertise(content);
		return "editIdxHotSaleAdv";
	}

	/**
	 * @return the advId
	 */
	public String getAdvId() {
		return advId;
	}

	/**
	 * @return the advName
	 */
	public String getAdvName() {
		return advName;
	}

	/**
	 * @return the advStatus
	 */
	public String getAdvStatus() {
		return advStatus;
	}

	/**
	 * @return the advType
	 */
	public String getAdvType() {
		return advType;
	}

	/**
	 * @return the content
	 */
	public GenerateContent getContent() {
		return content;
	}

	/**
	 * @return the endDate
	 */
	public String getEndDate() {
		return endDate;
	}

	/**
	 * @return the startDate
	 */
	public String getStartDate() {
		return startDate;
	}

	/**
	 * @return the tab1Img
	 */
	public File getTab1Img() {
		return tab1Img;
	}

	/**
	 * @return the tab1ImgFolder
	 */
	public String getTab1ImgFolder() {
		return tab1ImgFolder;
	}

	/**
	 * @return the tab1ImgLink
	 */
	public String getTab1ImgLink() {
		return tab1ImgLink;
	}

	/**
	 * @return the tab1ImgName
	 */
	public String getTab1ImgName() {
		return tab1ImgName;
	}

	/**
	 * @return the tab1Prod1Link
	 */
	public String getTab1Prod1Link() {
		return tab1Prod1Link;
	}

	/**
	 * @return the tab1Prod2Link
	 */
	public String getTab1Prod2Link() {
		return tab1Prod2Link;
	}

	/**
	 * @return the tab1Prod3Link
	 */
	public String getTab1Prod3Link() {
		return tab1Prod3Link;
	}

	/**
	 * @return the tab1Prod4Link
	 */
	public String getTab1Prod4Link() {
		return tab1Prod4Link;
	}

	/**
	 * @return the tab1ProdId1
	 */
	public String getTab1ProdId1() {
		return tab1ProdId1;
	}

	/**
	 * @return the tab1ProdId2
	 */
	public String getTab1ProdId2() {
		return tab1ProdId2;
	}

	/**
	 * @return the tab1ProdId3
	 */
	public String getTab1ProdId3() {
		return tab1ProdId3;
	}

	/**
	 * @return the tab1ProdId4
	 */
	public String getTab1ProdId4() {
		return tab1ProdId4;
	}

	/**
	 * @return the tab2Img
	 */
	public File getTab2Img() {
		return tab2Img;
	}

	/**
	 * @return the tab2ImgFolder
	 */
	public String getTab2ImgFolder() {
		return tab2ImgFolder;
	}

	/**
	 * @return the tab2ImgLink
	 */
	public String getTab2ImgLink() {
		return tab2ImgLink;
	}

	/**
	 * @return the tab2ImgName
	 */
	public String getTab2ImgName() {
		return tab2ImgName;
	}

	/**
	 * @return the tab2Prod1Link
	 */
	public String getTab2Prod1Link() {
		return tab2Prod1Link;
	}

	/**
	 * @return the tab2Prod2Link
	 */
	public String getTab2Prod2Link() {
		return tab2Prod2Link;
	}

	/**
	 * @return the tab2Prod3Link
	 */
	public String getTab2Prod3Link() {
		return tab2Prod3Link;
	}

	/**
	 * @return the tab2Prod4Link
	 */
	public String getTab2Prod4Link() {
		return tab2Prod4Link;
	}

	/**
	 * @return the tab2ProdId1
	 */
	public String getTab2ProdId1() {
		return tab2ProdId1;
	}

	/**
	 * @return the tab2ProdId2
	 */
	public String getTab2ProdId2() {
		return tab2ProdId2;
	}

	/**
	 * @return the tab2ProdId3
	 */
	public String getTab2ProdId3() {
		return tab2ProdId3;
	}

	/**
	 * @return the tab2ProdId4
	 */
	public String getTab2ProdId4() {
		return tab2ProdId4;
	}

	/**
	 * @return the tab3Img
	 */
	public File getTab3Img() {
		return tab3Img;
	}

	/**
	 * @return the tab3ImgFolder
	 */
	public String getTab3ImgFolder() {
		return tab3ImgFolder;
	}

	/**
	 * @return the tab3ImgLink
	 */
	public String getTab3ImgLink() {
		return tab3ImgLink;
	}

	/**
	 * @return the tab3ImgName
	 */
	public String getTab3ImgName() {
		return tab3ImgName;
	}

	/**
	 * @return the tab3Prod1Link
	 */
	public String getTab3Prod1Link() {
		return tab3Prod1Link;
	}

	/**
	 * @return the tab3Prod2Link
	 */
	public String getTab3Prod2Link() {
		return tab3Prod2Link;
	}

	/**
	 * @return the tab3Prod3Link
	 */
	public String getTab3Prod3Link() {
		return tab3Prod3Link;
	}

	/**
	 * @return the tab3Prod4Link
	 */
	public String getTab3Prod4Link() {
		return tab3Prod4Link;
	}

	/**
	 * @return the tab3ProdId1
	 */
	public String getTab3ProdId1() {
		return tab3ProdId1;
	}

	/**
	 * @return the tab3ProdId2
	 */
	public String getTab3ProdId2() {
		return tab3ProdId2;
	}

	/**
	 * @return the tab3ProdId3
	 */
	public String getTab3ProdId3() {
		return tab3ProdId3;
	}

	/**
	 * @return the tab3ProdId4
	 */
	public String getTab3ProdId4() {
		return tab3ProdId4;
	}

	/**
	 * @return the tab4Img
	 */
	public File getTab4Img() {
		return tab4Img;
	}

	/**
	 * @return the tab4ImgFolder
	 */
	public String getTab4ImgFolder() {
		return tab4ImgFolder;
	}

	/**
	 * @return the tab4ImgLink
	 */
	public String getTab4ImgLink() {
		return tab4ImgLink;
	}

	/**
	 * @return the tab4ImgName
	 */
	public String getTab4ImgName() {
		return tab4ImgName;
	}

	/**
	 * @return the tab4Prod1Link
	 */
	public String getTab4Prod1Link() {
		return tab4Prod1Link;
	}

	/**
	 * @return the tab4Prod2Link
	 */
	public String getTab4Prod2Link() {
		return tab4Prod2Link;
	}

	/**
	 * @return the tab4Prod3Link
	 */
	public String getTab4Prod3Link() {
		return tab4Prod3Link;
	}

	/**
	 * @return the tab4Prod4Link
	 */
	public String getTab4Prod4Link() {
		return tab4Prod4Link;
	}

	/**
	 * @return the tab4ProdId1
	 */
	public String getTab4ProdId1() {
		return tab4ProdId1;
	}

	/**
	 * @return the tab4ProdId2
	 */
	public String getTab4ProdId2() {
		return tab4ProdId2;
	}

	/**
	 * @return the tab4ProdId3
	 */
	public String getTab4ProdId3() {
		return tab4ProdId3;
	}

	/**
	 * @return the tab4ProdId4
	 */
	public String getTab4ProdId4() {
		return tab4ProdId4;
	}

	/**
	 * @return the tab5Img
	 */
	public File getTab5Img() {
		return tab5Img;
	}

	/**
	 * @return the tab5ImgFolder
	 */
	public String getTab5ImgFolder() {
		return tab5ImgFolder;
	}

	/**
	 * @return the tab5ImgLink
	 */
	public String getTab5ImgLink() {
		return tab5ImgLink;
	}

	/**
	 * @return the tab5ImgName
	 */
	public String getTab5ImgName() {
		return tab5ImgName;
	}

	/**
	 * @return the tab5Prod1Link
	 */
	public String getTab5Prod1Link() {
		return tab5Prod1Link;
	}

	/**
	 * @return the tab5Prod2Link
	 */
	public String getTab5Prod2Link() {
		return tab5Prod2Link;
	}

	/**
	 * @return the tab5Prod3Link
	 */
	public String getTab5Prod3Link() {
		return tab5Prod3Link;
	}

	/**
	 * @return the tab5Prod4Link
	 */
	public String getTab5Prod4Link() {
		return tab5Prod4Link;
	}

	/**
	 * @return the tab5ProdId1
	 */
	public String getTab5ProdId1() {
		return tab5ProdId1;
	}

	/**
	 * @return the tab5ProdId2
	 */
	public String getTab5ProdId2() {
		return tab5ProdId2;
	}

	/**
	 * @return the tab5ProdId3
	 */
	public String getTab5ProdId3() {
		return tab5ProdId3;
	}

	/**
	 * @return the tab5ProdId4
	 */
	public String getTab5ProdId4() {
		return tab5ProdId4;
	}

	/**
	 * @return the tab6Img
	 */
	public File getTab6Img() {
		return tab6Img;
	}

	/**
	 * @return the tab6ImgFolder
	 */
	public String getTab6ImgFolder() {
		return tab6ImgFolder;
	}

	/**
	 * @return the tab6ImgLink
	 */
	public String getTab6ImgLink() {
		return tab6ImgLink;
	}

	/**
	 * @return the tab6ImgName
	 */
	public String getTab6ImgName() {
		return tab6ImgName;
	}

	/**
	 * @return the tab6Prod1Link
	 */
	public String getTab6Prod1Link() {
		return tab6Prod1Link;
	}

	/**
	 * @return the tab6Prod2Link
	 */
	public String getTab6Prod2Link() {
		return tab6Prod2Link;
	}

	/**
	 * @return the tab6Prod3Link
	 */
	public String getTab6Prod3Link() {
		return tab6Prod3Link;
	}

	/**
	 * @return the tab6Prod4Link
	 */
	public String getTab6Prod4Link() {
		return tab6Prod4Link;
	}

	/**
	 * @return the tab6ProdId1
	 */
	public String getTab6ProdId1() {
		return tab6ProdId1;
	}

	/**
	 * @return the tab6ProdId2
	 */
	public String getTab6ProdId2() {
		return tab6ProdId2;
	}

	/**
	 * @return the tab6ProdId3
	 */
	public String getTab6ProdId3() {
		return tab6ProdId3;
	}

	/**
	 * @return the tab6ProdId4
	 */
	public String getTab6ProdId4() {
		return tab6ProdId4;
	}

	private boolean idxHotSaleAdvValidate() throws CoreException, ParseException, IOException {
		/**************************** 必填栏位 ****************************/
		logger.info("advName = " + advName);

		if (StringUtils.isBlank(advName))
			addFieldError("advName", "请输入广告名称");

		if (StringUtils.isBlank(startDate))
			addFieldError("startDate", "请输入起始日期");

		if (StringUtils.isBlank(endDate))
			addFieldError("endDate", "请输入结束日期");

		if (StringUtils.isBlank(tab1ImgName))
			addFieldError("tab1ImgName", "請輸入tab1 img name");

		if (StringUtils.isBlank(tab1ImgLink))
			addFieldError("tab1ImgLink", "請輸入tab1 img link");

		if (StringUtils.isBlank(tab2ImgName))
			addFieldError("tab2ImgName", "請輸入tab2 img name");

		if (StringUtils.isBlank(tab2ImgLink))
			addFieldError("tab2ImgLink", "請輸入tab2 img link");

		if (StringUtils.isBlank(tab3ImgName))
			addFieldError("tab3ImgName", "請輸入tab3 img name");

		if (StringUtils.isBlank(tab3ImgLink))
			addFieldError("tab3ImgLink", "請輸入tab3 img link");

		if (StringUtils.isBlank(tab4ImgName))
			addFieldError("tab4ImgName", "請輸入tab4 img name");

		if (StringUtils.isBlank(tab4ImgLink))
			addFieldError("tab4ImgLink", "請輸入tab4 img link");

		if (StringUtils.isBlank(tab5ImgName))
			addFieldError("tab5ImgName", "請輸入tab5 img name");

		if (StringUtils.isBlank(tab5ImgLink))
			addFieldError("tab5ImgLink", "請輸入tab5 img link");

		if (StringUtils.isBlank(tab6ImgName))
			addFieldError("tab6ImgName", "請輸入tab6 img name");

		if (StringUtils.isBlank(tab6ImgLink))
			addFieldError("tab6ImgLink", "請輸入tab6 img link");

		if (StringUtils.isBlank(tab1ProdId1))
			addFieldError("tab1ProdId1", "請輸入tab1 ProdId1");

		if (StringUtils.isBlank(tab1ProdId2))
			addFieldError("tab1ProdId2", "請輸入tab1 ProdId2");

		if (StringUtils.isBlank(tab1ProdId3))
			addFieldError("tab1ProdId3", "請輸入tab1 ProdId3");

		if (StringUtils.isBlank(tab1ProdId4))
			addFieldError("tab1ProdId4", "請輸入tab1 ProdId4");

		if (StringUtils.isBlank(tab2ProdId1))
			addFieldError("tab2ProdId1", "請輸入tab2 ProdId1");

		if (StringUtils.isBlank(tab2ProdId2))
			addFieldError("tab2ProdId2", "請輸入tab2 ProdId2");

		if (StringUtils.isBlank(tab2ProdId3))
			addFieldError("tab2ProdId3", "請輸入tab2 ProdId3");

		if (StringUtils.isBlank(tab2ProdId4))
			addFieldError("tab2ProdId4", "請輸入tab2 ProdId4");

		if (StringUtils.isBlank(tab3ProdId1))
			addFieldError("tab3ProdId1", "請輸入tab3 ProdId1");

		if (StringUtils.isBlank(tab3ProdId2))
			addFieldError("tab3ProdId2", "請輸入tab3 ProdId2");

		if (StringUtils.isBlank(tab3ProdId3))
			addFieldError("tab3ProdId3", "請輸入tab3 ProdId3");

		if (StringUtils.isBlank(tab3ProdId4))
			addFieldError("tab3ProdId4", "請輸入tab3 ProdId4");

		if (StringUtils.isBlank(tab4ProdId1))
			addFieldError("tab4ProdId1", "請輸入tab4 ProdId1");

		if (StringUtils.isBlank(tab4ProdId2))
			addFieldError("tab4ProdId2", "請輸入tab4 ProdId2");

		if (StringUtils.isBlank(tab4ProdId3))
			addFieldError("tab4ProdId3", "請輸入tab4 ProdId3");

		if (StringUtils.isBlank(tab4ProdId4))
			addFieldError("tab4ProdId4", "請輸入tab4 ProdId4");

		if (StringUtils.isBlank(tab5ProdId1))
			addFieldError("tab5ProdId1", "請輸入tab5 ProdId1");

		if (StringUtils.isBlank(tab5ProdId2))
			addFieldError("tab5ProdId2", "請輸入tab5 ProdId2");

		if (StringUtils.isBlank(tab5ProdId3))
			addFieldError("tab5ProdId3", "請輸入tab5 ProdId3");

		if (StringUtils.isBlank(tab5ProdId4))
			addFieldError("tab5ProdId4", "請輸入tab5 ProdId4");

		if (StringUtils.isBlank(tab6ProdId1))
			addFieldError("tab6ProdId1", "請輸入tab6 ProdId1");

		if (StringUtils.isBlank(tab6ProdId2))
			addFieldError("tab6ProdId2", "請輸入tab6 ProdId2");

		if (StringUtils.isBlank(tab6ProdId3))
			addFieldError("tab6ProdId3", "請輸入tab6 ProdId3");

		if (StringUtils.isBlank(tab6ProdId4))
			addFieldError("tab6ProdId4", "請輸入tab6 ProdId4");

		// ------ check link --------------------------------
		if (StringUtils.isBlank(tab1Prod1Link))
			addFieldError("tab1Prod1Link", "請輸入tab1  标题1 Link");

		if (StringUtils.isBlank(tab1Prod2Link))
			addFieldError("tab1Prod2Link", "請輸入tab1  标题2 Link");

		if (StringUtils.isBlank(tab1Prod3Link))
			addFieldError("tab1Prod3Link", "請輸入tab1  标题3 Link");

		if (StringUtils.isBlank(tab1Prod4Link))
			addFieldError("tab1Prod4Link", "請輸入tab1  标题4 Link");
		// 2
		if (StringUtils.isBlank(tab2Prod1Link))
			addFieldError("tab2Prod1Link", "請輸入tab2  标题1 Link");

		if (StringUtils.isBlank(tab2Prod2Link))
			addFieldError("tab2Prod2Link", "請輸入tab2  标题2 Link");

		if (StringUtils.isBlank(tab2Prod3Link))
			addFieldError("tab2Prod3Link", "請輸入tab2  标题3 Link");

		if (StringUtils.isBlank(tab2Prod4Link))
			addFieldError("tab2Prod4Link", "請輸入tab2  标题4 Link");
		// 3
		if (StringUtils.isBlank(tab3Prod1Link))
			addFieldError("tab3Prod1Link", "請輸入tab3  标题1 Link");

		if (StringUtils.isBlank(tab3Prod2Link))
			addFieldError("tab3Prod2Link", "請輸入tab3  标题2 Link");

		if (StringUtils.isBlank(tab3Prod3Link))
			addFieldError("tab3Prod3Link", "請輸入tab3  标题3 Link");

		if (StringUtils.isBlank(tab3Prod4Link))
			addFieldError("tab3Prod4Link", "請輸入tab3  标题4 Link");
		// 4
		if (StringUtils.isBlank(tab4Prod1Link))
			addFieldError("tab4Prod1Link", "請輸入tab4  标题1 Link");

		if (StringUtils.isBlank(tab4Prod2Link))
			addFieldError("tab4Prod2Link", "請輸入tab4  标题2 Link");

		if (StringUtils.isBlank(tab4Prod3Link))
			addFieldError("tab4Prod3Link", "請輸入tab4  标题3 Link");

		if (StringUtils.isBlank(tab4Prod4Link))
			addFieldError("tab4Prod4Link", "請輸入tab4  标题4 Link");
		// 5
		if (StringUtils.isBlank(tab5Prod1Link))
			addFieldError("tab5Prod1Link", "請輸入tab5  标题1 Link");

		if (StringUtils.isBlank(tab5Prod2Link))
			addFieldError("tab5Prod2Link", "請輸入tab5  标题2 Link");

		if (StringUtils.isBlank(tab5Prod3Link))
			addFieldError("tab5Prod3Link", "請輸入tab5  标题3 Link");

		if (StringUtils.isBlank(tab5Prod4Link))
			addFieldError("tab5Prod4Link", "請輸入tab5  标题4 Link");
		// 6
		if (StringUtils.isBlank(tab6Prod1Link))
			addFieldError("tab6Prod1Link", "請輸入tab6  标题1 Link");

		if (StringUtils.isBlank(tab6Prod2Link))
			addFieldError("tab6Prod2Link", "請輸入tab6  标题2 Link");

		if (StringUtils.isBlank(tab6Prod3Link))
			addFieldError("tab6Prod3Link", "請輸入tab6  标题3 Link");

		if (StringUtils.isBlank(tab6Prod4Link))
			addFieldError("tab6Prod4Link", "請輸入tab6  标题4 Link");

		if (getFieldErrors().isEmpty())
			return true;
		else
			return false;
	}

	/**
	 * 初始化变数值
	 */
	void initVariables() {
		advertise = new GenerateAdvertise();
		position = new GeneratePosition();
		content = new GenerateContent();

		tab1Img = null;
		tab1ImgName = "";
		tab1ImgLink = "";
		tab1ImgFolder = "";
		tab1ProdId1 = "";
		tab1ProdId2 = "";
		tab1ProdId3 = "";
		tab1ProdId4 = "";
		tab1Prod1Link = "";
		tab1Prod2Link = "";
		tab1Prod3Link = "";
		tab1Prod4Link = "";

		tab2Img = null;
		tab2ImgName = "";
		tab2ImgLink = "";
		tab2ImgFolder = "";
		tab2ProdId1 = "";
		tab2ProdId2 = "";
		tab2ProdId3 = "";
		tab2ProdId4 = "";
		tab2Prod1Link = "";
		tab2Prod2Link = "";
		tab2Prod3Link = "";
		tab2Prod4Link = "";

		tab3Img = null;
		tab3ImgName = "";
		tab3ImgLink = "";
		tab3ImgFolder = "";
		tab3ProdId1 = "";
		tab3ProdId2 = "";
		tab3ProdId3 = "";
		tab3ProdId4 = "";
		tab3Prod1Link = "";
		tab3Prod2Link = "";
		tab3Prod3Link = "";
		tab3Prod4Link = "";

		tab4Img = null;
		tab4ImgName = "";
		tab4ImgLink = "";
		tab4ImgFolder = "";
		tab4ProdId1 = "";
		tab4ProdId2 = "";
		tab4ProdId3 = "";
		tab4ProdId4 = "";
		tab4Prod1Link = "";
		tab4Prod2Link = "";
		tab4Prod3Link = "";
		tab4Prod4Link = "";

		tab5Img = null;
		tab5ImgName = "";
		tab5ImgLink = "";
		tab5ImgFolder = "";
		tab5ProdId1 = "";
		tab5ProdId2 = "";
		tab5ProdId3 = "";
		tab5ProdId4 = "";
		tab5Prod1Link = "";
		tab5Prod2Link = "";
		tab5Prod3Link = "";
		tab5Prod4Link = "";

		tab6Img = null;
		tab6ImgName = "";
		tab6ImgLink = "";
		tab6ImgFolder = "";
		tab6ProdId1 = "";
		tab6ProdId2 = "";
		tab6ProdId3 = "";
		tab6ProdId4 = "";
		tab6Prod1Link = "";
		tab6Prod2Link = "";
		tab6Prod3Link = "";
		tab6Prod4Link = "";

		startDate = "";
		endDate = "";
	}

	public void prepare() throws Exception {
		// TODO Auto-generated method stub
		clearErrorsAndMessages();
	}

	/**
	 * 從db讀取propertise資料
	 * 
	 * @param content
	 * @throws IOException
	 */
	void readPropertise(GenerateContent content) throws IOException {
		Properties prop = new Properties();
		Reader reader = new StringReader(content.getContents());
		prop.load(reader);
		reader.close();
		tab1ImgName = StringUtils.defaultString(prop.get("tab1ImgName").toString());
		tab1ImgLink = StringUtils.defaultString(prop.get("tab1ImgLink").toString(), "");
		tab1ImgFolder = StringUtils.defaultString(prop.get("tab1ImgFolder").toString(), "");

		tab1ProdId1 = StringUtils.defaultString(prop.get("tab1ProdId1").toString(), "");
		tab1ProdId2 = StringUtils.defaultString(prop.get("tab1ProdId2").toString(), "");
		tab1ProdId3 = StringUtils.defaultString(prop.get("tab1ProdId3").toString(), "");
		tab1ProdId4 = StringUtils.defaultString(prop.get("tab1ProdId4").toString(), "");
		tab1Prod1Link = StringUtils.defaultString(prop.get("tab1Prod1Link").toString(), "");
		tab1Prod2Link = StringUtils.defaultString(prop.get("tab1Prod2Link").toString(), "");
		tab1Prod3Link = StringUtils.defaultString(prop.get("tab1Prod3Link").toString(), "");
		tab1Prod4Link = StringUtils.defaultString(prop.get("tab1Prod4Link").toString(), "");

		tab2ImgName = StringUtils.defaultString(prop.get("tab2ImgName").toString(), "");
		tab2ImgLink = StringUtils.defaultString(prop.get("tab2ImgLink").toString(), "");
		tab2ImgFolder = StringUtils.defaultString(prop.get("tab2ImgFolder").toString(), "");

		tab2ProdId1 = StringUtils.defaultString(prop.get("tab2ProdId1").toString(), "");
		tab2ProdId2 = StringUtils.defaultString(prop.get("tab2ProdId2").toString(), "");
		tab2ProdId3 = StringUtils.defaultString(prop.get("tab2ProdId3").toString(), "");
		tab2ProdId4 = StringUtils.defaultString(prop.get("tab2ProdId4").toString(), "");
		tab2Prod1Link = StringUtils.defaultString(prop.get("tab2Prod1Link").toString(), "");
		tab2Prod2Link = StringUtils.defaultString(prop.get("tab2Prod2Link").toString(), "");
		tab2Prod3Link = StringUtils.defaultString(prop.get("tab2Prod3Link").toString(), "");
		tab2Prod4Link = StringUtils.defaultString(prop.get("tab2Prod4Link").toString(), "");

		tab3ImgName = StringUtils.defaultString(prop.get("tab3ImgName").toString(), "");
		tab3ImgLink = StringUtils.defaultString(prop.get("tab3ImgLink").toString(), "");
		tab3ImgFolder = StringUtils.defaultString(prop.get("tab3ImgFolder").toString(), "");

		tab3ProdId1 = StringUtils.defaultString(prop.get("tab3ProdId1").toString(), "");
		tab3ProdId2 = StringUtils.defaultString(prop.get("tab3ProdId2").toString(), "");
		tab3ProdId3 = StringUtils.defaultString(prop.get("tab3ProdId3").toString(), "");
		tab3ProdId4 = StringUtils.defaultString(prop.get("tab3ProdId4").toString(), "");
		tab3Prod1Link = StringUtils.defaultString(prop.get("tab3Prod1Link").toString(), "");
		tab3Prod2Link = StringUtils.defaultString(prop.get("tab3Prod2Link").toString(), "");
		tab3Prod3Link = StringUtils.defaultString(prop.get("tab3Prod3Link").toString(), "");
		tab3Prod4Link = StringUtils.defaultString(prop.get("tab3Prod4Link").toString(), "");

		tab4ImgName = StringUtils.defaultString(prop.get("tab4ImgName").toString(), "");
		tab4ImgLink = StringUtils.defaultString(prop.get("tab4ImgLink").toString(), "");
		tab4ImgFolder = StringUtils.defaultString(prop.get("tab4ImgFolder").toString(), "");

		tab4ProdId1 = StringUtils.defaultString(prop.get("tab4ProdId1").toString(), "");
		tab4ProdId2 = StringUtils.defaultString(prop.get("tab4ProdId2").toString(), "");
		tab4ProdId3 = StringUtils.defaultString(prop.get("tab4ProdId3").toString(), "");
		tab4ProdId4 = StringUtils.defaultString(prop.get("tab4ProdId4").toString(), "");
		tab4Prod1Link = StringUtils.defaultString(prop.get("tab4Prod1Link").toString(), "");
		tab4Prod2Link = StringUtils.defaultString(prop.get("tab4Prod2Link").toString(), "");
		tab4Prod3Link = StringUtils.defaultString(prop.get("tab4Prod3Link").toString(), "");
		tab4Prod4Link = StringUtils.defaultString(prop.get("tab4Prod4Link").toString(), "");

		tab5ImgName = StringUtils.defaultString(prop.get("tab5ImgName").toString(), "");
		tab5ImgLink = StringUtils.defaultString(prop.get("tab5ImgLink").toString(), "");
		tab5ImgFolder = StringUtils.defaultString(prop.get("tab5ImgFolder").toString(), "");

		tab5ProdId1 = StringUtils.defaultString(prop.get("tab5ProdId1").toString(), "");
		tab5ProdId2 = StringUtils.defaultString(prop.get("tab5ProdId2").toString(), "");
		tab5ProdId3 = StringUtils.defaultString(prop.get("tab5ProdId3").toString(), "");
		tab5ProdId4 = StringUtils.defaultString(prop.get("tab5ProdId4").toString(), "");
		tab5Prod1Link = StringUtils.defaultString(prop.get("tab5Prod1Link").toString(), "");
		tab5Prod2Link = StringUtils.defaultString(prop.get("tab5Prod2Link").toString(), "");
		tab5Prod3Link = StringUtils.defaultString(prop.get("tab5Prod3Link").toString(), "");
		tab5Prod4Link = StringUtils.defaultString(prop.get("tab5Prod4Link").toString(), "");

		tab6ImgName = StringUtils.defaultString(prop.get("tab6ImgName").toString(), "");
		tab6ImgLink = StringUtils.defaultString(prop.get("tab6ImgLink").toString(), "");
		tab6ImgFolder = StringUtils.defaultString(prop.get("tab6ImgFolder").toString(), "");

		tab6ProdId1 = StringUtils.defaultString(prop.get("tab6ProdId1").toString(), "");
		tab6ProdId2 = StringUtils.defaultString(prop.get("tab6ProdId2").toString(), "");
		tab6ProdId3 = StringUtils.defaultString(prop.get("tab6ProdId3").toString(), "");
		tab6ProdId4 = StringUtils.defaultString(prop.get("tab6ProdId4").toString(), "");
		tab6Prod1Link = StringUtils.defaultString(prop.get("tab6Prod1Link").toString(), "");
		tab6Prod2Link = StringUtils.defaultString(prop.get("tab6Prod2Link").toString(), "");
		tab6Prod3Link = StringUtils.defaultString(prop.get("tab6Prod3Link").toString(), "");
		tab6Prod4Link = StringUtils.defaultString(prop.get("tab6Prod4Link").toString(), "");
	}

	/**
	 * 储存广告
	 * 
	 * @return
	 * @throws Exception
	 * @throws IOException
	 * @throws ParseException
	 * @throws CoreException
	 * @throws NumberFormatException
	 */
	public String saveIdxHotSaleAdv() throws NumberFormatException, CoreException, ParseException, IOException, Exception {
		boolean result = false;
		if (idxHotSaleAdvValidate()) {
			contents = new StringBuilder("");
			String today = FastDateFormat.getInstance("yyyyMMdd").format(DateUtil.getToday().getTime());
			// upload file
			if (GenerateHelper.mkDir(advType)) {
				if (StringUtils.isBlank(advId)) {// add
					eventImage = saveImgFile(tab1Img, tab1ImgName, advType);
					if (null != eventImage)
						contents.append("tab1ImgName=").append(eventImage.getUuid()).append(eventImage.getImgType()).append("\n")
								.append("tab1ImgFolder=").append(today).append("\n");

					eventImage = saveImgFile(tab2Img, tab2ImgName, advType);
					if (null != eventImage)
						contents.append("tab2ImgName=").append(eventImage.getUuid()).append(eventImage.getImgType()).append("\n")
								.append("tab2ImgFolder=").append(today).append("\n");

					eventImage = saveImgFile(tab3Img, tab3ImgName, advType);
					if (null != eventImage)
						contents.append("tab3ImgName=").append(eventImage.getUuid()).append(eventImage.getImgType()).append("\n")
								.append("tab3ImgFolder=").append(today).append("\n");

					eventImage = saveImgFile(tab4Img, tab4ImgName, advType);
					if (null != eventImage)
						contents.append("tab4ImgName=").append(eventImage.getUuid()).append(eventImage.getImgType()).append("\n")
								.append("tab4ImgFolder=").append(today).append("\n");

					eventImage = saveImgFile(tab5Img, tab5ImgName, advType);
					if (null != eventImage)
						contents.append("tab5ImgName=").append(eventImage.getUuid()).append(eventImage.getImgType()).append("\n")
								.append("tab5ImgFolder=").append(today).append("\n");

					eventImage = saveImgFile(tab6Img, tab6ImgName, advType);
					if (null != eventImage)
						contents.append("tab6ImgName=").append(eventImage.getUuid()).append(eventImage.getImgType()).append("\n")
								.append("tab6ImgFolder=").append(today).append("\n");
				} else {// update
					if (null == tab1Img)
						contents.append("tab1ImgName=").append(tab1ImgName).append("\n").append("tab1ImgFolder=").append(
								tab1ImgFolder).append("\n");
					else {
						eventImage = saveImgFile(tab1Img, tab1ImgName, advType);
						if (null != eventImage)
							contents.append("tab1ImgName=").append(eventImage.getUuid()).append(eventImage.getImgType()).append("\n")
									.append("tab1ImgFolder=").append(today).append("\n");
					}

					if (null == tab2Img)
						contents.append("tab2ImgName=").append(tab2ImgName).append("\n").append("tab2ImgFolder=").append(
								tab2ImgFolder).append("\n");
					else {
						eventImage = saveImgFile(tab2Img, tab2ImgName, advType);
						logger.info("tab2Img eventImage {}", eventImage);
						if (null != eventImage)
							contents.append("tab2ImgName=").append(eventImage.getUuid()).append(eventImage.getImgType()).append("\n")
									.append("tab2ImgFolder=").append(today).append("\n");
					}
					if (null == tab3Img)
						contents.append("tab3ImgName=").append(tab3ImgName).append("\n").append("tab3ImgFolder=").append(
								tab3ImgFolder).append("\n");
					else {
						eventImage = saveImgFile(tab3Img, tab3ImgName, advType);
						if (null != eventImage)
							contents.append("tab3ImgName=").append(eventImage.getUuid()).append(eventImage.getImgType()).append("\n")
									.append("tab3ImgFolder=").append(today).append("\n");
					}
					if (null == tab4Img)
						contents.append("tab4ImgName=").append(tab4ImgName).append("\n").append("tab4ImgFolder=").append(
								tab4ImgFolder).append("\n");
					else {
						eventImage = saveImgFile(tab4Img, tab4ImgName, advType);
						if (null != eventImage)
							contents.append("tab4ImgName=").append(eventImage.getUuid()).append(eventImage.getImgType()).append("\n")
									.append("tab4ImgFolder=").append(today).append("\n");
					}
					if (null == tab5Img)
						contents.append("tab5ImgName=").append(tab5ImgName).append("\n").append("tab5ImgFolder=").append(
								tab5ImgFolder).append("\n");
					else {
						eventImage = saveImgFile(tab5Img, tab5ImgName, advType);
						if (null != eventImage)
							contents.append("tab5ImgName=").append(eventImage.getUuid()).append(eventImage.getImgType()).append("\n")
									.append("tab5ImgFolder=").append(today).append("\n");
					}

					if (null == tab6Img)
						contents.append("tab6ImgName=").append(tab6ImgName).append("\n").append("tab6ImgFolder=").append(
								tab6ImgFolder).append("\n");
					else {
						eventImage = saveImgFile(tab6Img, tab6ImgName, advType);
						logger.info("tab6Img eventImage {}", eventImage);
						if (null != eventImage)
							contents.append("tab6ImgName=").append(eventImage.getUuid()).append(eventImage.getImgType()).append("\n")
									.append("tab6ImgFolder=").append(today).append("\n");
					}
				}

				contents.append("tab1ImgLink=").append(checkURL(tab1ImgLink)).append("\n").append("tab1ProdId1=").append(
						tab1ProdId1).append("\n").append("tab1Prod1Link=").append(checkURL(tab1Prod1Link)).append("\n").append(
						"tab1ProdId2=").append(tab1ProdId2).append("\n").append("tab1Prod2Link=").append(checkURL(tab1Prod2Link))
						.append("\n").append("tab1ProdId3=").append(tab1ProdId3).append("\n").append("tab1Prod3Link=").append(
								checkURL(tab1Prod3Link)).append("\n").append("tab1ProdId4=").append(tab1ProdId4).append("\n").append(
								"tab1Prod4Link=").append(checkURL(tab1Prod4Link)).append("\n").append("tab2ImgLink=").append(
								checkURL(tab2ImgLink)).append("\n").append("tab2ProdId1=").append(tab2ProdId1).append("\n").append(
								"tab2Prod1Link=").append(checkURL(tab2Prod1Link)).append("\n").append("tab2ProdId2=").append(
								tab2ProdId2).append("\n").append("tab2Prod2Link=").append(checkURL(tab2Prod2Link)).append("\n").append(
								"tab2ProdId3=").append(tab2ProdId3).append("\n").append("tab2Prod3Link=").append(
								checkURL(tab2Prod3Link)).append("\n").append("tab2ProdId4=").append(tab2ProdId4).append("\n").append(
								"tab2Prod4Link=").append(checkURL(tab2Prod4Link)).append("\n").append("tab3ImgLink=").append(
								checkURL(tab3ImgLink)).append("\n").append("tab3ProdId1=").append(tab3ProdId1).append("\n").append(
								"tab3Prod1Link=").append(checkURL(tab3Prod1Link)).append("\n").append("tab3ProdId2=").append(
								tab3ProdId2).append("\n").append("tab3Prod2Link=").append(checkURL(tab3Prod2Link)).append("\n").append(
								"tab3ProdId3=").append(tab3ProdId3).append("\n").append("tab3Prod3Link=").append(
								checkURL(tab3Prod3Link)).append("\n").append("tab3ProdId4=").append(tab3ProdId4).append("\n").append(
								"tab3Prod4Link=").append(checkURL(tab3Prod4Link)).append("\n").append("tab4ImgLink=").append(
								checkURL(tab4ImgLink)).append("\n").append("tab4ProdId1=").append(tab4ProdId1).append("\n").append(
								"tab4Prod1Link=").append(checkURL(tab4Prod1Link)).append("\n").append("tab4ProdId2=").append(
								tab4ProdId2).append("\n").append("tab4Prod2Link=").append(checkURL(tab4Prod2Link)).append("\n").append(
								"tab4ProdId3=").append(tab4ProdId3).append("\n").append("tab4Prod3Link=").append(
								checkURL(tab4Prod3Link)).append("\n").append("tab4ProdId4=").append(tab4ProdId4).append("\n").append(
								"tab4Prod4Link=").append(checkURL(tab4Prod4Link)).append("\n").append("tab5ImgLink=").append(
								checkURL(tab5ImgLink)).append("\n").append("tab5ProdId1=").append(tab5ProdId1).append("\n").append(
								"tab5Prod1Link=").append(checkURL(tab5Prod1Link)).append("\n").append("tab5ProdId2=").append(
								tab5ProdId2).append("\n").append("tab5Prod2Link=").append(checkURL(tab5Prod2Link)).append("\n").append(
								"tab5ProdId3=").append(tab5ProdId3).append("\n").append("tab5Prod3Link=").append(
								checkURL(tab5Prod3Link)).append("\n").append("tab5ProdId4=").append(tab5ProdId4).append("\n").append(
								"tab5Prod4Link=").append(checkURL(tab5Prod4Link)).append("\n").append("tab6ImgLink=").append(
								checkURL(tab6ImgLink)).append("\n").append("tab6ProdId1=").append(tab6ProdId1).append("\n").append(
								"tab6Prod1Link=").append(checkURL(tab6Prod1Link)).append("\n").append("tab6ProdId2=").append(
								tab6ProdId2).append("\n").append("tab6Prod2Link=").append(checkURL(tab6Prod2Link)).append("\n").append(
								"tab6ProdId3=").append(tab6ProdId3).append("\n").append("tab6Prod3Link=").append(
								checkURL(tab6Prod3Link)).append("\n").append("tab6ProdId4=").append(tab6ProdId4).append("\n").append(
								"tab6Prod4Link=").append(checkURL(tab6Prod4Link)).append("\n");
				if (StringUtils.isBlank(advId)) {
					advertise = new GenerateAdvertise();
					position = new GeneratePosition();
					content = new GenerateContent();
				} else {
					advertise = generateService.get(Long.parseLong(advId));
					position = generateService.getGeneratePositionByAdvId(Long.parseLong(advId)).get(0);
					content = generateService.getGenerateContentByAdvId(Long.parseLong(advId)).get(0);
				}
				// set advertise
				advertise.setAdvType(advType);
				advertise.setAdvName(advName.trim());
				advertise.setStartDate(EcConstant.PATTERN_DATE_FORMAT.parse(startDate));
				advertise.setEndDate(EcConstant.PATTERN_DATE_FORMAT.parse(endDate));
				advertise.setAdvStatus(advStatus);
				logger.info("save content : {}", contents.toString());
				content.setContents(contents.toString());

				if (StringUtils.countMatches(content.getContents(), "ImgName") == 6) {
					if (StringUtils.isBlank(advId))
						result = generateService.saveGenerateCombine(advertise, position, content);
					else
						result = generateService.updateGenerateCombine(advertise, position, content);
				} else
					result = false;
				contents.setLength(0);
				if (!result)
					return "editIdxHotSaleAdv";
				else {
					return "listIdxAdv";
				}
			}
		}
		return "editIdxHotSaleAdv";
	}

	EventImage saveImgFile(File imgFile, String fileName, String advType) throws Exception {
		try {
			eventImage = new EventImage();
			eventImage.setImgType(fileName.substring(fileName.lastIndexOf("."), fileName.length()));
			eventImage = generateService.saveEventImage(eventImage);
			boolean result = GenerateHelper.uploadImage(eventImage, imgFile, advType);
			if (result)
				return eventImage;
			else
				return null;
		} catch (Exception e) {
			logger.info("exception :{}", e.getMessage());
		}
		return null;
	}

	/**
	 * @param advId the advId to set
	 */
	public void setAdvId(String advId) {
		this.advId = advId;
	}

	/**
	 * @param advName the advName to set
	 */
	public void setAdvName(String advName) {
		this.advName = advName;
	}

	/**
	 * @param advStatus the advStatus to set
	 */
	public void setAdvStatus(String advStatus) {
		this.advStatus = advStatus;
	}

	/**
	 * @param advType the advType to set
	 */
	public void setAdvType(String advType) {
		this.advType = advType;
	}

	/**
	 * @param content the content to set
	 */
	public void setContent(GenerateContent content) {
		this.content = content;
	}

	/**
	 * @param endDate the endDate to set
	 */
	public void setEndDate(String endDate) {
		this.endDate = endDate;
	}

	/**
	 * @param generateService the generateService to set
	 */
	public void setGenerateService(GenerateService generateService) {
		this.generateService = generateService;
	}

	/**
	 * @param startDate the startDate to set
	 */
	public void setStartDate(String startDate) {
		this.startDate = startDate;
	}

	/**
	 * @param tab1Img the tab1Img to set
	 */
	public void setTab1Img(File tab1Img) {
		this.tab1Img = tab1Img;
	}

	/**
	 * @param tab1ImgFolder the tab1ImgFolder to set
	 */
	public void setTab1ImgFolder(String tab1ImgFolder) {
		this.tab1ImgFolder = tab1ImgFolder;
	}

	/**
	 * @param tab1ImgLink the tab1ImgLink to set
	 */
	public void setTab1ImgLink(String tab1ImgLink) {
		this.tab1ImgLink = tab1ImgLink;
	}

	/**
	 * @param tab1ImgName the tab1ImgName to set
	 */
	public void setTab1ImgName(String tab1ImgName) {
		this.tab1ImgName = tab1ImgName;
	}

	/**
	 * @param tab1Prod1Link the tab1Prod1Link to set
	 */
	public void setTab1Prod1Link(String tab1Prod1Link) {
		this.tab1Prod1Link = tab1Prod1Link;
	}

	/**
	 * @param tab1Prod2Link the tab1Prod2Link to set
	 */
	public void setTab1Prod2Link(String tab1Prod2Link) {
		this.tab1Prod2Link = tab1Prod2Link;
	}

	/**
	 * @param tab1Prod3Link the tab1Prod3Link to set
	 */
	public void setTab1Prod3Link(String tab1Prod3Link) {
		this.tab1Prod3Link = tab1Prod3Link;
	}

	/**
	 * @param tab1Prod4Link the tab1Prod4Link to set
	 */
	public void setTab1Prod4Link(String tab1Prod4Link) {
		this.tab1Prod4Link = tab1Prod4Link;
	}

	/**
	 * @param tab1ProdId1 the tab1ProdId1 to set
	 */
	public void setTab1ProdId1(String tab1ProdId1) {
		this.tab1ProdId1 = tab1ProdId1;
	}

	/**
	 * @param tab1ProdId2 the tab1ProdId2 to set
	 */
	public void setTab1ProdId2(String tab1ProdId2) {
		this.tab1ProdId2 = tab1ProdId2;
	}

	/**
	 * @param tab1ProdId3 the tab1ProdId3 to set
	 */
	public void setTab1ProdId3(String tab1ProdId3) {
		this.tab1ProdId3 = tab1ProdId3;
	}

	/**
	 * @param tab1ProdId4 the tab1ProdId4 to set
	 */
	public void setTab1ProdId4(String tab1ProdId4) {
		this.tab1ProdId4 = tab1ProdId4;
	}

	/**
	 * @param tab2Img the tab2Img to set
	 */
	public void setTab2Img(File tab2Img) {
		this.tab2Img = tab2Img;
	}

	/**
	 * @param tab2ImgFolder the tab2ImgFolder to set
	 */
	public void setTab2ImgFolder(String tab2ImgFolder) {
		this.tab2ImgFolder = tab2ImgFolder;
	}

	/**
	 * @param tab2ImgLink the tab2ImgLink to set
	 */
	public void setTab2ImgLink(String tab2ImgLink) {
		this.tab2ImgLink = tab2ImgLink;
	}

	/**
	 * @param tab2ImgName the tab2ImgName to set
	 */
	public void setTab2ImgName(String tab2ImgName) {
		this.tab2ImgName = tab2ImgName;
	}

	/**
	 * @param tab2Prod1Link the tab2Prod1Link to set
	 */
	public void setTab2Prod1Link(String tab2Prod1Link) {
		this.tab2Prod1Link = tab2Prod1Link;
	}

	/**
	 * @param tab2Prod2Link the tab2Prod2Link to set
	 */
	public void setTab2Prod2Link(String tab2Prod2Link) {
		this.tab2Prod2Link = tab2Prod2Link;
	}

	/**
	 * @param tab2Prod3Link the tab2Prod3Link to set
	 */
	public void setTab2Prod3Link(String tab2Prod3Link) {
		this.tab2Prod3Link = tab2Prod3Link;
	}

	/**
	 * @param tab2Prod4Link the tab2Prod4Link to set
	 */
	public void setTab2Prod4Link(String tab2Prod4Link) {
		this.tab2Prod4Link = tab2Prod4Link;
	}

	/**
	 * @param tab2ProdId1 the tab2ProdId1 to set
	 */
	public void setTab2ProdId1(String tab2ProdId1) {
		this.tab2ProdId1 = tab2ProdId1;
	}

	/**
	 * @param tab2ProdId2 the tab2ProdId2 to set
	 */
	public void setTab2ProdId2(String tab2ProdId2) {
		this.tab2ProdId2 = tab2ProdId2;
	}

	/**
	 * @param tab2ProdId3 the tab2ProdId3 to set
	 */
	public void setTab2ProdId3(String tab2ProdId3) {
		this.tab2ProdId3 = tab2ProdId3;
	}

	/**
	 * @param tab2ProdId4 the tab2ProdId4 to set
	 */
	public void setTab2ProdId4(String tab2ProdId4) {
		this.tab2ProdId4 = tab2ProdId4;
	}

	/**
	 * @param tab3Img the tab3Img to set
	 */
	public void setTab3Img(File tab3Img) {
		this.tab3Img = tab3Img;
	}

	/**
	 * @param tab3ImgFolder the tab3ImgFolder to set
	 */
	public void setTab3ImgFolder(String tab3ImgFolder) {
		this.tab3ImgFolder = tab3ImgFolder;
	}

	/**
	 * @param tab3ImgLink the tab3ImgLink to set
	 */
	public void setTab3ImgLink(String tab3ImgLink) {
		this.tab3ImgLink = tab3ImgLink;
	}

	/**
	 * @param tab3ImgName the tab3ImgName to set
	 */
	public void setTab3ImgName(String tab3ImgName) {
		this.tab3ImgName = tab3ImgName;
	}

	/**
	 * @param tab3Prod1Link the tab3Prod1Link to set
	 */
	public void setTab3Prod1Link(String tab3Prod1Link) {
		this.tab3Prod1Link = tab3Prod1Link;
	}

	/**
	 * @param tab3Prod2Link the tab3Prod2Link to set
	 */
	public void setTab3Prod2Link(String tab3Prod2Link) {
		this.tab3Prod2Link = tab3Prod2Link;
	}

	/**
	 * @param tab3Prod3Link the tab3Prod3Link to set
	 */
	public void setTab3Prod3Link(String tab3Prod3Link) {
		this.tab3Prod3Link = tab3Prod3Link;
	}

	/**
	 * @param tab3Prod4Link the tab3Prod4Link to set
	 */
	public void setTab3Prod4Link(String tab3Prod4Link) {
		this.tab3Prod4Link = tab3Prod4Link;
	}

	/**
	 * @param tab3ProdId1 the tab3ProdId1 to set
	 */
	public void setTab3ProdId1(String tab3ProdId1) {
		this.tab3ProdId1 = tab3ProdId1;
	}

	/**
	 * @param tab3ProdId2 the tab3ProdId2 to set
	 */
	public void setTab3ProdId2(String tab3ProdId2) {
		this.tab3ProdId2 = tab3ProdId2;
	}

	/**
	 * @param tab3ProdId3 the tab3ProdId3 to set
	 */
	public void setTab3ProdId3(String tab3ProdId3) {
		this.tab3ProdId3 = tab3ProdId3;
	}

	/**
	 * @param tab3ProdId4 the tab3ProdId4 to set
	 */
	public void setTab3ProdId4(String tab3ProdId4) {
		this.tab3ProdId4 = tab3ProdId4;
	}

	/**
	 * @param tab4Img the tab4Img to set
	 */
	public void setTab4Img(File tab4Img) {
		this.tab4Img = tab4Img;
	}

	/**
	 * @param tab4ImgFolder the tab4ImgFolder to set
	 */
	public void setTab4ImgFolder(String tab4ImgFolder) {
		this.tab4ImgFolder = tab4ImgFolder;
	}

	/**
	 * @param tab4ImgLink the tab4ImgLink to set
	 */
	public void setTab4ImgLink(String tab4ImgLink) {
		this.tab4ImgLink = tab4ImgLink;
	}

	/**
	 * @param tab4ImgName the tab4ImgName to set
	 */
	public void setTab4ImgName(String tab4ImgName) {
		this.tab4ImgName = tab4ImgName;
	}

	/**
	 * @param tab4Prod1Link the tab4Prod1Link to set
	 */
	public void setTab4Prod1Link(String tab4Prod1Link) {
		this.tab4Prod1Link = tab4Prod1Link;
	}

	/**
	 * @param tab4Prod2Link the tab4Prod2Link to set
	 */
	public void setTab4Prod2Link(String tab4Prod2Link) {
		this.tab4Prod2Link = tab4Prod2Link;
	}

	/**
	 * @param tab4Prod3Link the tab4Prod3Link to set
	 */
	public void setTab4Prod3Link(String tab4Prod3Link) {
		this.tab4Prod3Link = tab4Prod3Link;
	}

	/**
	 * @param tab4Prod4Link the tab4Prod4Link to set
	 */
	public void setTab4Prod4Link(String tab4Prod4Link) {
		this.tab4Prod4Link = tab4Prod4Link;
	}

	/**
	 * @param tab4ProdId1 the tab4ProdId1 to set
	 */
	public void setTab4ProdId1(String tab4ProdId1) {
		this.tab4ProdId1 = tab4ProdId1;
	}

	/**
	 * @param tab4ProdId2 the tab4ProdId2 to set
	 */
	public void setTab4ProdId2(String tab4ProdId2) {
		this.tab4ProdId2 = tab4ProdId2;
	}

	/**
	 * @param tab4ProdId3 the tab4ProdId3 to set
	 */
	public void setTab4ProdId3(String tab4ProdId3) {
		this.tab4ProdId3 = tab4ProdId3;
	}

	/**
	 * @param tab4ProdId4 the tab4ProdId4 to set
	 */
	public void setTab4ProdId4(String tab4ProdId4) {
		this.tab4ProdId4 = tab4ProdId4;
	}

	/**
	 * @param tab5Img the tab5Img to set
	 */
	public void setTab5Img(File tab5Img) {
		this.tab5Img = tab5Img;
	}

	/**
	 * @param tab5ImgFolder the tab5ImgFolder to set
	 */
	public void setTab5ImgFolder(String tab5ImgFolder) {
		this.tab5ImgFolder = tab5ImgFolder;
	}

	/**
	 * @param tab5ImgLink the tab5ImgLink to set
	 */
	public void setTab5ImgLink(String tab5ImgLink) {
		this.tab5ImgLink = tab5ImgLink;
	}

	/**
	 * @param tab5ImgName the tab5ImgName to set
	 */
	public void setTab5ImgName(String tab5ImgName) {
		this.tab5ImgName = tab5ImgName;
	}

	/**
	 * @param tab5Prod1Link the tab5Prod1Link to set
	 */
	public void setTab5Prod1Link(String tab5Prod1Link) {
		this.tab5Prod1Link = tab5Prod1Link;
	}

	/**
	 * @param tab5Prod2Link the tab5Prod2Link to set
	 */
	public void setTab5Prod2Link(String tab5Prod2Link) {
		this.tab5Prod2Link = tab5Prod2Link;
	}

	/**
	 * @param tab5Prod3Link the tab5Prod3Link to set
	 */
	public void setTab5Prod3Link(String tab5Prod3Link) {
		this.tab5Prod3Link = tab5Prod3Link;
	}

	/**
	 * @param tab5Prod4Link the tab5Prod4Link to set
	 */
	public void setTab5Prod4Link(String tab5Prod4Link) {
		this.tab5Prod4Link = tab5Prod4Link;
	}

	/**
	 * @param tab5ProdId1 the tab5ProdId1 to set
	 */
	public void setTab5ProdId1(String tab5ProdId1) {
		this.tab5ProdId1 = tab5ProdId1;
	}

	/**
	 * @param tab5ProdId2 the tab5ProdId2 to set
	 */
	public void setTab5ProdId2(String tab5ProdId2) {
		this.tab5ProdId2 = tab5ProdId2;
	}

	/**
	 * @param tab5ProdId3 the tab5ProdId3 to set
	 */
	public void setTab5ProdId3(String tab5ProdId3) {
		this.tab5ProdId3 = tab5ProdId3;
	}

	/**
	 * @param tab5ProdId4 the tab5ProdId4 to set
	 */
	public void setTab5ProdId4(String tab5ProdId4) {
		this.tab5ProdId4 = tab5ProdId4;
	}

	/**
	 * @param tab6Img the tab6Img to set
	 */
	public void setTab6Img(File tab6Img) {
		this.tab6Img = tab6Img;
	}

	/**
	 * @param tab6ImgFolder the tab6ImgFolder to set
	 */
	public void setTab6ImgFolder(String tab6ImgFolder) {
		this.tab6ImgFolder = tab6ImgFolder;
	}

	/**
	 * @param tab6ImgLink the tab6ImgLink to set
	 */
	public void setTab6ImgLink(String tab6ImgLink) {
		this.tab6ImgLink = tab6ImgLink;
	}

	/**
	 * @param tab6ImgName the tab6ImgName to set
	 */
	public void setTab6ImgName(String tab6ImgName) {
		this.tab6ImgName = tab6ImgName;
	}

	/**
	 * @param tab6Prod1Link the tab6Prod1Link to set
	 */
	public void setTab6Prod1Link(String tab6Prod1Link) {
		this.tab6Prod1Link = tab6Prod1Link;
	}

	/**
	 * @param tab6Prod2Link the tab6Prod2Link to set
	 */
	public void setTab6Prod2Link(String tab6Prod2Link) {
		this.tab6Prod2Link = tab6Prod2Link;
	}

	/**
	 * @param tab6Prod3Link the tab6Prod3Link to set
	 */
	public void setTab6Prod3Link(String tab6Prod3Link) {
		this.tab6Prod3Link = tab6Prod3Link;
	}

	/**
	 * @param tab6Prod4Link the tab6Prod4Link to set
	 */
	public void setTab6Prod4Link(String tab6Prod4Link) {
		this.tab6Prod4Link = tab6Prod4Link;
	}

	/**
	 * @param tab6ProdId1 the tab6ProdId1 to set
	 */
	public void setTab6ProdId1(String tab6ProdId1) {
		this.tab6ProdId1 = tab6ProdId1;
	}

	/**
	 * @param tab6ProdId2 the tab6ProdId2 to set
	 */
	public void setTab6ProdId2(String tab6ProdId2) {
		this.tab6ProdId2 = tab6ProdId2;
	}

	/**
	 * @param tab6ProdId3 the tab6ProdId3 to set
	 */
	public void setTab6ProdId3(String tab6ProdId3) {
		this.tab6ProdId3 = tab6ProdId3;
	}

	/**
	 * @param tab6ProdId4 the tab6ProdId4 to set
	 */
	public void setTab6ProdId4(String tab6ProdId4) {
		this.tab6ProdId4 = tab6ProdId4;
	}
}
